<?php

/**
 * common functions for vertdream theme.
 */


/**
 * get_title
 *
 */
function get_title(){
    if(is_single()){
        $title = single_post_title('', false);
    }
    elseif(is_home() || is_front_page()){
        $title = get_bloginfo('name').' | '.get_bloginfo('description');
    }
    elseif(is_page()){
        $title = single_post_title('', false);
    }
    elseif(is_search){
        $title = get_bloginfo('name').' | Search results for '.wp_specialchars($s);
    }
    elseif(is_404()){
        $title = get_bloginfo('name').' | Not Found';
    }
    else{
        $title = get_bloginfo('name').' | '.get_bloginfo('description');
    }
    echo $title;
}
